<form role="form" method="post">
    <input type="hidden" id="id_attribut" name="data[id_attribut]" value="">
    <div class="row">    
        <div class="col-md-3">
            <div class="form-group">
                <label for="libelle">Libellé</label>
                <input type="text" class="form-control" id="libelle" name="data[libelle]" placeholder="Libellé" value="" required>
            </div>
            <div class="form-group">
                <label for="alias">Alias</label>
                <input type="text" class="form-control" id="alias" name="data[alias]" placeholder="Alias" value="" required>
            </div>            
            <div class="form-group">
                <label for="type">Type du champ</label>
                <select class="form-control" id="type" name="data[type]">
                    <?php echo $fieldTypes; ?>
                </select>
            </div>
            <div class="form-group">
                <label for="active">Activé</label>
                <select class="form-control" id="active" name="data[active]">
                    <option value="1">Oui</option>
                    <option value="0">Non</option>
                </select>
            </div> 
            <div class="form-group">
                <label for="css_class">Classe CSS</label>
                <input type="text" class="form-control" id="css_class" name="data[css_class]" placeholder="Classe CSS" value="">
            </div>
        </div> 
        <div class="col-md-3">            
            <div class="form-group">
                <label for="predefined_option">Options prédéfinies</label>
                <input type="text" class="form-control" id="predefined_option" name="data[predefined_option]" placeholder="Séparées par des virgules" value="">
            </div>
            <div class="form-group">
                <label for="predefined_value">Valeurs prédéfinies</label>
                <input type="text" class="form-control" id="predefined_value" name="data[predefined_value]" placeholder="Séparées par des virgules" value="">
            </div>  
            <div class="form-group">
                <label for="default_value">Valeur par défaut</label>
                <select class="form-control" id="type" name="data[default_value]">
                    <?php echo $fieldDefaultValues; ?>
                </select>
            </div>
            <div class="form-group">
                <label for="affected_value">Valeur affectée</label>
                <select class="form-control" id="type" name="data[affected_value]">
                    <?php echo $fieldAffectedValues; ?>
                </select>
            </div>
            <div class="form-group">
                <label for="required">Requis</label>
                <select class="form-control" id="required" name="data[required]">                    
                    <option value="0">Non</option>
                    <option value="1">Oui</option>
                </select>
            </div>
        </div> 
        <div class="col-md-3">
            <div class="form-group">
                <label for="col">Positionné après</label>
                <select class="form-control" id="position" name="data[position]">
                    <option value="0">-- Aucun --</option>
                    <?php foreach($attributs as $attribut) { ?>
                    <option value="<?php echo $attribut->position; ?>"><?php echo $attribut->col_title; ?></option>
                    <?php } ?>
                </select>
            </div> 
            <div class="form-group">
                <label for="col">Afficher en tant que colonne</label>
                <select class="form-control" id="col" name="data[col]">
                    <option value="0">Non</option>
                    <option value="1">Oui</option>
                </select>
            </div>
            <div class="form-group">
                <label for="col_title">Titre de la colonne</label>
                <input type="text" class="form-control" id="col_title" name="data[col_title]" placeholder="Titre de la colonne" value="">
            </div>
            <div class="form-group">
                <label for="col">Peut être rechercher</label>
                <select class="form-control" id="search" name="data[search]">                    
                    <option value="0">Non</option>
                    <option value="1">Oui</option>
                </select>
            </div>
        </div>
    </div>
    <div class="row pull-right">
        <button type="submit" class="btn btn-success">Enregistrer</button>
        <button type="button" class="btn btn-danger" onclick="goTo('index.php?controller=attribut')">Annuler</button>
    </div>
</form>


